package sctu.edu.java.year2016.team02.huangguojing.day20160605.Chapter12_2;

/**
 * Created by Eoly on 2016/6/5.
 * 编写程序，使用字符输入、输出流读取文件，将一段文字加密后存入文件，然后再读取，并将加密前与加密后的文件输出。
 */
class WordsChanges {
    private String preWords;
    private String endWords;

    public WordsChanges(String preWords) {
        this.preWords = preWords;
    }

    public WordsChanges() {
    }

    public void setEndWords(String endWords) {
        this.endWords = endWords;
    }

    public String getEndWords() {
        return endWords;
    }

    public String getPreWords() {
        return preWords;
    }

    public void setPreWords(String preWords) {
        this.preWords = preWords;
    }

    String toString(String words){
        setPreWords(words);
        if(preWords.length()==0) {
            System.out.println("No words in after changes!");
            return "";
        }
        else {
            return words;
        }
    }
}
